<template>
  <el-button :loading="loading" type="primary" icon="search" @click="search(1)">
    {{ label }}
  </el-button>
</template>
<script>
export default {
  name: 'SearchButton',
  props: {
    loading: {
      type: Boolean,
      required: false,
      default: () => {
        return false
      },
    },
    label: {
      type: String,
      default: () => {
        return '查询'
      },
    },
    search: {
      type: Function,
      required: true,
    },
  },
}
</script>
